{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Circle and CircleMarker"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5LmNvbS9qcXVlcnktMS4xMi40Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI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lYWZsZXQuYXdlc29tZS5yb3RhdGUubWluLmNzcyIvPgogICAgCiAgICAgICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfOGFmNzk5NTU0MWFlNDk3NzkxNjcyMzZmNWM4YmUxNjUgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9naC9samFnaXMvbGVhZmxldC1tZWFzdXJlQDIuMS43L2Rpc3QvbGVhZmxldC1tZWFzdXJlLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9naC9samFnaXMvbGVhZmxldC1tZWFzdXJlQDIuMS43L2Rpc3QvbGVhZmxldC1tZWFzdXJlLm1pbi5jc3MiLz4KPC9oZWFkPgo8Ym9keT4gICAgCiAgICAKICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF84YWY3OTk1NTQxYWU0OTc3OTE2NzIzNmY1YzhiZTE2NSIgPjwvZGl2PgogICAgICAgIAo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXBfOGFmNzk5NTU0MWFlNDk3NzkxNjcyMzZmNWM4YmUxNjUgPSBMLm1hcCgKICAgICAgICAgICAgICAgICJtYXBfOGFmNzk5NTU0MWFlNDk3NzkxNjcyMzZmNWM4YmUxNjUiLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNlbnRlcjogWy0yNy41NzE3LCAtNDguNjI1Nl0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA5LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfYjZlZmZkOWQ1OTUxNGM0OWFmNmJmZTlmN2M4Njc1MzEgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4LCAibWF4Wm9vbSI6IDE4LCAibWluWm9vbSI6IDAsICJub1dyYXAiOiBmYWxzZSwg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gICAgIDwvZGl2PmAsCiAgICAgICAgICAgICAgICB7InN0aWNreSI6IHRydWV9CiAgICAgICAgICAgICk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIGNpcmNsZV9tYXJrZXJfZTFhMjVlNTE0N2ExNDFmZjg2YmRjYmZmMzc2NTEwODkgPSBMLmNpcmNsZU1hcmtlcigKICAgICAgICAgICAgICAgIFstMjcuMzUsIC00OC44XSwKICAgICAgICAgICAgICAgIHsiYnViYmxpbmdNb3VzZUV2ZW50cyI6IHRydWUsICJjb2xvciI6ICJibGFjayIsICJkYXNoQXJyYXkiOiBudWxsLCAiZGFzaE9mZnNldCI6IG51bGwsICJmaWxsIjogZmFsc2UsICJmaWxsQ29sb3IiOiAiYmxhY2siLCAiZmlsbE9wYWNpdHkiOiAwLjYsICJmaWxsUnVsZSI6ICJldmVub2RkIiwgImxpbmVDYXAiOiAicm91bmQiLCAibGluZUpvaW4iOiAicm91bmQiLCAib3BhY2l0eSI6IDEsICJyYWRpdXMiOiAyNSwgInN0cm9rZSI6IHRydWUsICJ3ZWlnaHQiOiAzfQogICAgICAgICAgICApLmFkZFRvKG1hcF84YWY3OTk1NTQxYWU0OTc3OTE2NzIzNmY1YzhiZTE2NSk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIGNpcmNsZV9lYmY0NWVjYmIyZDI0NjcyYjg1M2M4YjQ1YjViZTI3MSA9IEwuY2lyY2xlKAogICAgICAgICAgICAgICAgWy0yNy41NTE2NjcsIC00OC40Nzg4ODldLAogICAgICAgICAgICAgICAgeyJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwgImNvbG9yIjogImJsYWNrIiwgImRhc2hBcnJheSI6IG51bGwsICJkYXNoT2Zmc2V0IjogbnVsbCwgImZpbGwiOiB0cnVlLCAiZmlsbENvbG9yIjogImdyZWVuIiwgImZpbGxPcGFjaXR5IjogMC42LCAiZmlsbFJ1bGUiOiAiZXZlbm9kZCIsICJsaW5lQ2FwIjogInJ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AgICAgeyJzdGlja3kiOiB0cnVlfQogICAgICAgICAgICApOwogICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7f68502b2130>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import folium\n",
    "from folium.plugins.measure_control import MeasureControl\n",
    "\n",
    "m = folium.Map(location=[-27.5717, -48.6256], zoom_start=9)\n",
    "\n",
    "c = MeasureControl()\n",
    "c.add_to(m)\n",
    "\n",
    "radius = 50\n",
    "folium.CircleMarker(\n",
    "    location=[-27.55, -48.8],\n",
    "    radius=radius,\n",
    "    color=\"cornflowerblue\",\n",
    "    stroke=False,\n",
    "    fill=True,\n",
    "    fill_opacity=0.6,\n",
    "    opacity=1,\n",
    "    popup=\"{} pixels\".format(radius),\n",
    "    tooltip=\"I am in pixels\",\n",
    ").add_to(m)\n",
    "\n",
    "radius = 25\n",
    "folium.CircleMarker(\n",
    "    location=[-27.35, -48.8],\n",
    "    radius=radius,\n",
    "    color=\"black\",\n",
    "    weight=3,\n",
    "    fill=False,\n",
    "    fill_opacity=0.6,\n",
    "    opacity=1,\n",
    ").add_to(m)\n",
    "\n",
    "radius = 10000\n",
    "folium.Circle(\n",
    "    location=[-27.551667, -48.478889],\n",
    "    radius=radius,\n",
    "    color=\"black\",\n",
    "    weight=1,\n",
    "    fill_opacity=0.6,\n",
    "    opacity=1,\n",
    "    fill_color=\"green\",\n",
    "    fill=False,  # gets overridden by fill_color\n",
    "    popup=\"{} meters\".format(radius),\n",
    "    tooltip=\"I am in meters\",\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### PolyLine"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5LmNvbS9qcXVlcnktMS4xMi40Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVhZ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PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfMTE3NzQzOWFiYWIyNDQ0NzhhZTYzYTk0M2U3MzhjYzQgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzExNzc0MzlhYmFiMjQ0NDc4YWU2M2E5NDNlNzM4Y2M0IiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF8xMTc3NDM5YWJhYjI0NDQ3OGFlNjNhOTQzZTczOGNjNCA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF8xMTc3NDM5YWJhYjI0NDQ3OGFlNjNhOTQzZTczOGNjNCIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbNDEuOSwgLTk3LjNdLAogICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcsCiAgICAgICAgICAgICAgICAgICAgem9vbTogNCwKICAgICAgICAgICAgICAgICAgICB6b29tQ29udHJvbDogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBwcmVmZXJDYW52YXM6IGZhbHNl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DYXAiOiAicm91bmQiLCAibGluZUpvaW4iOiAicm91bmQiLCAibm9DbGlwIjogZmFsc2UsICJvcGFjaXR5IjogMS4wLCAic21vb3RoRmFjdG9yIjogNTAsICJzdHJva2UiOiB0cnVlLCAid2VpZ2h0IjogNX0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfMTE3NzQzOWFiYWIyNDQ0NzhhZTYzYTk0M2U3MzhjYzQpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIHBvbHlfbGluZV84ZjczMzgwNmNmMDM0MDU4YjhiYjZjM2JkZjBjZGQ1OS5iaW5kVG9vbHRpcCgKICAgICAgICAgICAgICAgIGA8ZGl2PgogICAgICAgICAgICAgICAgICAgICBUb28gbXVjaCBzbW9vdGhpbmc/CiAgICAgICAgICAgICAgICAgPC9kaXY+YCwKICAgICAgICAgICAgICAgIHsic3RpY2t5IjogdHJ1ZX0KICAgICAgICAgICAgKTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7f67f6b202b0>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Coordinates are 15 points on the great circle from Boston to\n",
    "# San Francisco.\n",
    "# Reference: http://williams.best.vwh.net/avform.htm#Intermediate\n",
    "coordinates = [\n",
    "    [42.3581, -71.0636],\n",
    "    [42.82995815, -74.78991444],\n",
    "    [43.17929819, -78.56603306],\n",
    "    [43.40320216, -82.37774519],\n",
    "    [43.49975489, -86.20965845],\n",
    "    [43.46811941, -90.04569087],\n",
    "    [43.30857071, -93.86961818],\n",
    "    [43.02248456, -97.66563267],\n",
    "    [42.61228259, -101.41886832],\n",
    "    [42.08133868, -105.11585198],\n",
    "    [41.4338549, -108.74485069],\n",
    "    [40.67471747, -112.29609954],\n",
    "    [39.8093434, -115.76190821],\n",
    "    [38.84352776, -119.13665678],\n",
    "    [37.7833, -122.4167],\n",
    "]\n",
    "\n",
    "\n",
    "# Create the map and add the line\n",
    "m = folium.Map(location=[41.9, -97.3], zoom_start=4)\n",
    "\n",
    "folium.PolyLine(\n",
    "    locations=coordinates,\n",
    "    color=\"#FF0000\",\n",
    "    weight=5,\n",
    "    tooltip=\"From Boston to San Francisco\",\n",
    ").add_to(m)\n",
    "\n",
    "folium.PolyLine(\n",
    "    smooth_factor=50,\n",
    "    locations=coordinates,\n",
    "    color=\"grey\",\n",
    "    tooltip=\"Too much smoothing?\",\n",
    "    weight=5,\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Dateline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtya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MzIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF80ZWQyZWU4MTE0MzQ0ODliYTgzN2NjOGIwMjE5NjBjMyA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF80ZWQyZWU4MTE0MzQ0ODliYTgzN2NjOGIwMjE5NjBjMyIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbMC4wLCAwLjBdLAogICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcsCiAgICAgICAgICAgICAgICAgICAgem9vbTogMSwKICAgICAgICAgICAgICAgICAgICB6b29tQ29udHJvbDogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBwcmVmZXJDYW52YXM6IGZhbHNlLAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApOwoKICAgICAgICAgICAgCgogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyXzZkNzdkMzE3MDQ3MTRjMTBhZmE5ZmVmOGY0MGFmZWI0ID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAgICAgICAiaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmciLAogICAgICAgICAgICAgICAgeyJhdHRyaWJ1dGlvbiI6ICJEYXRhIGJ5IFx1MDAyNmNvcHk7IFx1MDAzY2EgaHJlZj1cImh0dHA6Ly9vcGVuc3RyZWV0bWFwLm9yZ1wiXHUwMDNlT3BlblN0cmVldE1hcFx1MDAzYy9hXHUwMDNlLCB1bmRlciBcdTAwM2NhIGhyZWY9XCJodHRwOi8vd3d3Lm9wZW5zdHJlZXRtYXAub3JnL2NvcHlyaWdodFwiXHUwMDNlT0RiTFx1MDAzYy9hXHUwMDNlLiIsICJkZXRlY3RSZXRpbmEiOiBmYWxzZSwgIm1heE5hdGl2ZVpvb20iOiAxOCwgIm1heFpv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AgICAgICk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHBvbHlfbGluZV9mZjhkYWY5MWM4MTY0YWI5OWQzZGVhYzhkZGFiMmEwNSA9IEwucG9seWxpbmUoCiAgICAgICAgICAgICAgICBbWy0yLjAsIDE3OS4wXSwgWy0yLjAsIDE4MS4wXV0sCiAgICAgICAgICAgICAgICB7ImJ1YmJsaW5nTW91c2VFdmVudHMiOiB0cnVlLCAiY29sb3IiOiAiYmx1ZSIsICJkYXNoQXJyYXkiOiBudWxsLCAiZGFzaE9mZnNldCI6IG51bGwsICJmaWxsIjogZmFsc2UsICJmaWxsQ29sb3IiOiAiYmx1ZSIsICJmaWxsT3BhY2l0eSI6IDAuMiwgImZpbGxSdWxlIjogImV2ZW5vZGQiLCAibGluZUNhcCI6ICJidXR0IiwgImxpbmVKb2luIjogInJvdW5kIiwgIm5vQ2xpcCI6IGZhbHNlLCAib3BhY2l0eSI6IDEuMCwgInNtb290aEZhY3RvciI6IDEuMCwgInN0cm9rZSI6IHRydWUsICJ3ZWlnaHQiOiA2fQogICAgICAgICAgICApLmFkZFRvKG1hcF80ZWQyZWU4MTE0MzQ0ODliYTgzN2NjOGIwMjE5NjBjMyk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgcG9seV9saW5lX2ZmOGRhZjkxYzgxNjRhYjk5ZDNkZWFjOGRkYWIyYTA1LmJpbmRUb29sdGlwKAogICAgICAgICAgICAgICAgYDxkaXY+CiAgICAgICAgICAgICAgICAgICAgIENvcnJlY3QKICAgICAgICAgICAgICAgICA8L2Rpdj5gLAogICAgICAgICAgICAgICAgeyJzdGlja3kiOiB0cnVlfQogICAgICAgICAgICApOwogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBwb2x5X2xpbmVfZjRiNjI3YzBlYzcyNGY2MGE3OGRhZjdjMDNjNjA0ZGYgPSBMLnBvbHlsaW5lKAogICAgICAgICAgICAgICAgW1stNi4wLCAtMTc5LjBdLCBbLTYuMCwgMTc5LjBdXSwKICAgICAgICAgICAgICAgIHsiYnViYmxpbmdNb3VzZUV2ZW50cyI6IHRydWUsICJjb2xvciI6ICJncmVlbiIsICJkYXNoQXJyYXkiOiBudWxsLCAiZGFzaE9mZnNldCI6IG51bGwsICJmaWxsIjogZmFsc2UsICJmaWxsQ29sb3IiOiAiZ3JlZW4iLCAiZmlsbE9wYWNpdHkiOiAwLjIsICJmaWxsUnVsZSI6ICJldmVub2RkIiwgImxpbmVDYXAiOiAic3F1YXJlIiwgImxpbmVKb2luIjogInJvdW5kIiwgIm5vQ2xpcCI6IGZhbHNlLCAib3BhY2l0eSI6IDEuMCwgInNtb290aEZhY3RvciI6IDEuMCwgInN0cm9rZSI6IHRydWUsICJ3ZWlnaHQiOiA2fQogICAgICAgICAgICApLmFkZFRvKG1hcF80ZWQyZWU4MTE0MzQ0ODliYTgzN2NjOGIwMjE5NjBjMyk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgcG9seV9saW5lX2Y0YjYyN2MwZWM3MjRmNjBhNzhkYWY3YzAzYzYwNGRmLmJpbmRUb29sdGlwKAogICAgICAgICAgICAgICAgYDxkaXY+CiAgICAgICAgICAgICAgICAgICAgIENvcnJlY3QKICAgICAgICAgICAgICAgICA8L2Rpdj5gLAogICAgICAgICAgICAgICAgeyJzdGlja3kiOiB0cnVlfQogICAgICAgICAgICApOwogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBwb2x5X2xpbmVfMjZiMjdjZmI2NTIxNDk5M2EyZDM2ZGUyMTUwYjcwM2IgPSBMLnBvbHlsaW5lKAogICAgICAgICAgICAgICAgW1sxMi4wLCAtMTc5LjBdLCBbMTIuMCwgMTkwLjBdXSwKICAgICAgICAgICAgICAgIHsiYnViYmxpbmdNb3VzZUV2ZW50cyI6IHRydWUsICJjb2xvciI6ICJvcmFuZ2UiLCAiZGFzaEFycmF5IjogbnVsbCwgImRhc2hPZmZzZXQiOiBudWxsLCAiZmlsbCI6IGZhbHNlLCAiZmlsbENvbG9yIjogIm9yYW5nZSIsICJmaWxsT3BhY2l0eSI6IDAuMiwgImZpbGxSdWxlIjogImV2ZW5vZGQiLCAibGluZUNhcCI6ICJyb3VuZCIsICJsaW5lSm9pbiI6ICJyb3VuZCIsICJub0NsaXAiOiBmYWxzZSwgIm9wYWNpdHkiOiAxLjAsICJzbW9vdGhGYWN0b3IiOiAxLjAsICJzdHJva2UiOiB0cnVlLCAid2VpZ2h0IjogNn0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfNGVkMmVlODExNDM0NDg5YmE4MzdjYzhiMDIxOTYwYzMpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIHBvbHlfbGluZV8yNmIyN2NmYjY1MjE0OTkzYTJkMzZkZTIxNTBiNzAzYi5iaW5kVG9vbHRpcCgKICAgICAgICAgICAgICAgIGA8ZGl2PgogICAgICAgICAgICAgICAgICAgICBBcnRpZmFjdD8KICAgICAgICAgICAgICAgICA8L2Rpdj5gLAogICAgICAgICAgICAgICAgeyJzdGlja3kiOiB0cnVlfQogICAgICAgICAgICApOwogICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7f67f6ad0f70>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lon = lat = 0\n",
    "zoom_start = 1\n",
    "\n",
    "m = folium.Map(location=[lat, lon], zoom_start=zoom_start)\n",
    "\n",
    "kw = {\"opacity\": 1.0, \"weight\": 6}\n",
    "folium.PolyLine(\n",
    "    locations=[(2, 179), (2, -179)],\n",
    "    tooltip=\"Wrong\",\n",
    "    color=\"red\",\n",
    "    line_cap=\"round\",\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "folium.PolyLine(\n",
    "    locations=[(-2, 179), (-2, 181)],\n",
    "    tooltip=\"Correct\",\n",
    "    line_cap=\"butt\",\n",
    "    color=\"blue\",\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "folium.PolyLine(\n",
    "    locations=[(-6, -179), (-6, 179)],\n",
    "    line_cap=\"square\",\n",
    "    color=\"green\",\n",
    "    tooltip=\"Correct\",\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "folium.PolyLine(\n",
    "    locations=[(12, -179), (12, 190)],\n",
    "    color=\"orange\",\n",
    "    tooltip=\"Artifact?\",\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### MultiPolyline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KIC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keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF81MzYwZjM3MGQ5YTU0Mzc1YjhhMmIzM2NkYzdiYjJhYiA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF81MzYwZjM3MGQ5YTU0Mzc1YjhhMmIzM2NkYzdiYjJhYiIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbMzguODkzOTksIC03Ny4wMzY1OV0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiAxNywKICAgICAgICAgICAgICAgICAgICB6b29tQ29udHJvbDogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBwcmVmZXJDYW52YXM6IGZhbHNlLAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApOwoKICAgICAgICAgICAgCgogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyXzA3YjUzMjlmNDk2MDQxYzJhOTRkZTYwMmUwMzA2YWViID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAgICAgICAiaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmciLAogICAgICAgICAgICAgICAgeyJhdHRyaWJ1dGlvbiI6ICJEYXRhIGJ5IFx1MDAyNmNvcHk7IFx1MDAzY2EgaHJlZj1cImh0dHA6Ly9vcGVuc3RyZWV0bWFwLm9yZ1wiXHUwMDNlT3BlblN0cmVldE1hcFx1MDAzYy9hXHUwMDNlLCB1bmRlciBcdTAwM2NhIGhyZWY9XCJodHRwOi8vd3d3Lm9wZW5zdHJlZXRtYXAub3JnL2NvcHlyaWdodFwiXHUwMDNlT0RiTFx1MDAzYy9hXHUwMDNlLiIsICJkZXRlY3RSZXRpbmEiOiBmYWxzZSwgIm1heE5hdGl2ZVpvb20iOiAxOCwgIm1heFpvb20iOiAxOCwgIm1pblpvb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3OTU3NTcyOTM3XSwgWzM4Ljg5MzAxMTkxNDIyMDc3LCAtNzcuMDM1OTI4OTY0NjE0ODddXSwgW1szOC44OTMwMTE5MTQyMjA3NywgLTc3LjAzNTkyODk2NDYxNDg3XSwgWzM4Ljg5MzE2MjIyMjQyODMxLCAtNzcuMDM1NDk5ODExMTcyNDldXSwgW1szOC44OTMxNjIyMjI0MjgzMSwgLTc3LjAzNTQ5OTgxMTE3MjQ5XSwgWzM4Ljg5MzQwNDM4NDk4MjQ4LCAtNzcuMDM1MTQ1NzU5NTgyNTJdXSwgW1szOC44OTM0MDQzODQ5ODI0OCwgLTc3LjAzNTE0NTc1OTU4MjUyXSwgWzM4Ljg5MzU5NjQ0NDM1MjEzNCwgLTc3LjAzNDk2MzM2OTM2OTVdXV0sCiAgICAgICAgICAgICAgICB7ImJ1YmJsaW5nTW91c2VFdmVudHMiOiB0cnVlLCAiY29sb3IiOiAib3JhbmdlIiwgImRhc2hBcnJheSI6IG51bGwsICJkYXNoT2Zmc2V0IjogbnVsbCwgImZpbGwiOiBmYWxzZSwgImZpbGxDb2xvciI6ICJvcmFuZ2UiLCAiZmlsbE9wYWNpdHkiOiAwLjIsICJmaWxsUnVsZSI6ICJldmVub2RkIiwgImxpbmVDYXAiOiAicm91bmQiLCAibGluZUpvaW4iOiAicm91bmQiLCAibm9DbGlwIjogZmFsc2UsICJvcGFjaXR5IjogMSwgInNtb290aEZhY3RvciI6IDAsICJzdHJva2UiOiB0cnVlLCAid2VpZ2h0IjogOH0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfNTM2MGYzNzBkOWE1NDM3NWI4YTJiMzNjZGM3YmIyYWIpOwogICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7f6850306550>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lat = +38.89399\n",
    "lon = -77.03659\n",
    "zoom_start = 17\n",
    "\n",
    "m = folium.Map(location=[lat, lon], zoom_start=zoom_start)\n",
    "\n",
    "kw = {\"color\": \"red\", \"fill\": True, \"radius\": 20}\n",
    "\n",
    "folium.CircleMarker([38.89415, -77.03738], **kw).add_to(m)\n",
    "folium.CircleMarker([38.89415, -77.03578], **kw).add_to(m)\n",
    "\n",
    "\n",
    "locations = [\n",
    "    [\n",
    "        (38.893596444352134, -77.03814983367920),\n",
    "        (38.893379333722040, -77.03792452812195),\n",
    "    ],\n",
    "    [\n",
    "        (38.893379333722040, -77.03792452812195),\n",
    "        (38.893162222428310, -77.03761339187622),\n",
    "    ],\n",
    "    [\n",
    "        (38.893162222428310, -77.03761339187622),\n",
    "        (38.893028615148424, -77.03731298446655),\n",
    "    ],\n",
    "    [\n",
    "        (38.893028615148424, -77.03731298446655),\n",
    "        (38.892920059048464, -77.03691601753235),\n",
    "    ],\n",
    "    [\n",
    "        (38.892920059048464, -77.03691601753235),\n",
    "        (38.892903358095296, -77.03637957572937),\n",
    "    ],\n",
    "    [\n",
    "        (38.892903358095296, -77.03637957572937),\n",
    "        (38.893011914220770, -77.03592896461487),\n",
    "    ],\n",
    "    [\n",
    "        (38.893011914220770, -77.03592896461487),\n",
    "        (38.893162222428310, -77.03549981117249),\n",
    "    ],\n",
    "    [\n",
    "        (38.893162222428310, -77.03549981117249),\n",
    "        (38.893404384982480, -77.03514575958252),\n",
    "    ],\n",
    "    [\n",
    "        (38.893404384982480, -77.03514575958252),\n",
    "        (38.893596444352134, -77.03496336936950),\n",
    "    ],\n",
    "]\n",
    "\n",
    "folium.PolyLine(\n",
    "    locations=locations,\n",
    "    color=\"orange\",\n",
    "    weight=8,\n",
    "    opacity=1,\n",
    "    smooth_factor=0,\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Rectangle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5LmNvbS9qcXVlcnktMS4xMi40Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6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gICAgICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfYjQyMjIxODlkYjllNDlhOTlmZTBkZTc1MTc4MWU5YzYgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwX2I0MjIyMTg5ZGI5ZTQ5YTk5ZmUwZGU3NTE3ODFlOWM2IiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF9iNDIyMjE4OWRiOWU0OWE5OWZlMGRlNzUxNzgxZTljNiA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF9iNDIyMjE4OWRiOWU0OWE5OWZlMGRlNzUxNzgxZTljNiIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbMzUuNjg1LCAxMzkuNzZdLAogICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcsCiAgICAgICAgICAgICAgICAgICAgem9vbTogMTUsCiAgICAgICAgICAgICAgICAgICAgem9vbUNvbnRyb2w6IH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2FiYTg3Y2M1OGZhMThiMWI5LmJpbmRQb3B1cChwb3B1cF8yNTJlODg1MDU2NzI0Njg1OWI3OGY4ZmQ5YjhlMWE5YikKICAgICAgICA7CgogICAgICAgIAogICAgCiAgICAKICAgICAgICAgICAgcmVjdGFuZ2xlXzE1YTE4ODBlMmI0MzQxM2FiYTg3Y2M1OGZhMThiMWI5LmJpbmRUb29sdGlwKAogICAgICAgICAgICAgICAgYDxkaXY+CiAgICAgICAgICAgICAgICAgICAgIDxzdHJvbmc+Q2xpY2sgbWUhPC9zdHJvbmc+CiAgICAgICAgICAgICAgICAgPC9kaXY+YCwKICAgICAgICAgICAgICAgIHsic3RpY2t5IjogdHJ1ZX0KICAgICAgICAgICAgKTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7f67f6abb610>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[35.685, 139.76], zoom_start=15)\n",
    "\n",
    "kw = {\n",
    "    \"color\": \"blue\",\n",
    "    \"line_cap\": \"round\",\n",
    "    \"fill\": True,\n",
    "    \"fill_color\": \"red\",\n",
    "    \"weight\": 5,\n",
    "    \"popup\": \"Tokyo, Japan\",\n",
    "    \"tooltip\": \"<strong>Click me!</strong>\",\n",
    "}\n",
    "\n",
    "folium.Rectangle(\n",
    "    bounds=[[35.681, 139.766], [35.691, 139.776]],\n",
    "    line_join=\"round\",\n",
    "    dash_array=\"5, 5\",\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "dx = 0.012\n",
    "folium.Rectangle(\n",
    "    bounds=[[35.681, 139.766 - dx], [35.691, 139.776 - dx]],\n",
    "    line_join=\"mitter\",\n",
    "    dash_array=\"5, 10\",\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "folium.Rectangle(\n",
    "    bounds=[[35.681, 139.766 - 2 * dx], [35.691, 139.7762 - 2 * dx]],\n",
    "    line_join=\"bevel\",\n",
    "    dash_array=\"15, 10, 5, 10, 15\",\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Polygon"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ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vbWUtbWFya2Vycy5jc3MiLz4KICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L2doL3B5dGhvbi12aXN1YWxpemF0aW9uL2ZvbGl1bS9mb2xpdW0vdGVtcGxhdGVzL2xlYWZsZXQuYXdlc29tZS5yb3RhdGUubWluLmNzcyIvPgogICAgCiAgICAgICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfY2YzYjQwNzM5YWIxNGJmMWJlODgwNzg4NzBhOWRiYjUgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwX2NmM2I0MDczOWFiMTRiZjFiZTg4MDc4ODcwYTlkYmI1IiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF9jZjNiNDA3MzlhYjE0YmYxYmU4ODA3ODg3MGE5ZGJiNSA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF9jZjNiNDA3MzlhYjE0YmYxYmU4OD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2h0OiAxMDAuMCU7Ij5Ub2t5bywgSmFwYW48L2Rpdj5gKVswXTsKICAgICAgICAgICAgcG9wdXBfZmQwYTlkMWViZWVmNDJkNzk4OTgxNGNjY2U1OGE1MDEuc2V0Q29udGVudChodG1sX2MzNmZmMTY3MjgxNDQyNzVhYjkyYzU2OWFhMmZlMzhjKTsKICAgICAgICAKCiAgICAgICAgcG9seWdvbl8zYmIyYmQ2OTE5YmM0ZTdjOGRlNTIzY2VmNjhiNWJmZS5iaW5kUG9wdXAocG9wdXBfZmQwYTlkMWViZWVmNDJkNzk4OTgxNGNjY2U1OGE1MDEpCiAgICAgICAgOwoKICAgICAgICAKICAgIAogICAgCiAgICAgICAgICAgIHBvbHlnb25fM2JiMmJkNjkxOWJjNGU3YzhkZTUyM2NlZjY4YjViZmUuYmluZFRvb2x0aXAoCiAgICAgICAgICAgICAgICBgPGRpdj4KICAgICAgICAgICAgICAgICAgICAgQ2xpY2sgbWUhCiAgICAgICAgICAgICAgICAgPC9kaXY+YCwKICAgICAgICAgICAgICAgIHsic3RpY2t5IjogdHJ1ZX0KICAgICAgICAgICAgKTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7f67f6b11b20>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[35.67, 139.78], zoom_start=13)\n",
    "\n",
    "locations = [\n",
    "    [35.6762, 139.7795],\n",
    "    [35.6718, 139.7831],\n",
    "    [35.6767, 139.7868],\n",
    "    [35.6795, 139.7824],\n",
    "    [35.6787, 139.7791],\n",
    "]\n",
    "\n",
    "folium.Polygon(\n",
    "    locations=locations,\n",
    "    color=\"blue\",\n",
    "    weight=6,\n",
    "    fill_color=\"red\",\n",
    "    fill_opacity=0.5,\n",
    "    fill=True,\n",
    "    popup=\"Tokyo, Japan\",\n",
    "    tooltip=\"Click me!\",\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5LmNvbS9qcXVlcnktMS4xMi40Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4y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Gl1bS9mb2xpdW0vdGVtcGxhdGVzL2xlYWZsZXQuYXdlc29tZS5yb3RhdGUubWluLmNzcyIvPgogICAgCiAgICAgICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfNDY4ODEwMjQzY2Y2NGViMzk5YTBjNDAyOWE1MWI1OGUgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzQ2ODgxMDI0M2NmNjRlYjM5OWEwYzQwMjlhNTFiNThlIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF80Njg4MTAyNDNjZjY0ZWIzOTlhMGM0MDI5YTUxYjU4ZSA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF80Njg4MTAyNDNjZjY0ZWIzOTlhMGM0MDI5YTUxYjU4ZSIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbNy41Nzc3OTgxMTM5OTE4MzIsIDguOTk3MzExMTA0NTIzOTNdLAogICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcsCiAgICAgICAgICAgICAgICAgICAgem9vbTogMTYsCiAgICAgICAgICAgICAgICAgICAgem9vbUNvbnRyb2w6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgcHJlZmVyQ2FudmFzOiBmYWxzZSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKTsKCiAgICAgICAgICAgIAoKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl82YzYyYzkzNWQxNmY0MGExYjg1OGVhZWRhYjMyNWMwNSA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgImh0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nIiwKICAgICAgICAgICAgICAgIHsiYXR0cmlidXRpb24iOiAiRGF0YSBieSBcdTAwMjZjb3B5OyBcdTAwM2NhIGhyZWY9XCJodHRwOi8vb3BlbnN0cmVldG1hcC5vcmdcIlx1MDAzZU9wZW5TdHJlZXRNYXBcdTAwM2MvYVx1MDAzZSwgdW5kZXIgXHUwMDNjYSBocmVmPVwiaHR0cDovL3d3dy5vcGVuc3RyZWV0bWFwLm9yZy9jb3B5cmlnaHRcIlx1MDAzZU9EYkxcdTAwM2MvYVx1MDAzZS4iLCAiZGV0ZWN0UmV0aW5hIjogZmFsc2UsICJtYXhOYXRpdmVab29tIjogMTgsICJtYXhab29tIjogMTgsICJtaW5ab29tIjogMCwgIm5vV3JhcCI6IGZhbHNlLCAib3BhY2l0eSI6IDEsICJzdWJkb21haW5zIjogImFiYyIsICJ0bXMiOiBmYWxzZX0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfNDY4ODEwMjQzY2Y2NGViMzk5YTBjNDAyOWE1MWI1OGUpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBwb2x5Z29uXzVmZWI1YjIxZDlmYTRmZDliZjg5ZmQzZDRhNmRlMTM0ID0gTC5wb2x5Z29uKAog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ogICAgICAgICAgICAgICAgIDwvZGl2PmAsCiAgICAgICAgICAgICAgICB7InN0aWNreSI6IHRydWV9CiAgICAgICAgICAgICk7CiAgICAgICAgCjwvc2NyaXB0Pg== onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7f67f6b203d0>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "locations = [\n",
    "    [\n",
    "        [7.577794326946673, 8.998503901433935],\n",
    "        [7.577851434795945, 8.998572430673164],\n",
    "        [7.577988491475764, 8.998652380403087],\n",
    "        [7.578105560723088, 8.998426807051544],\n",
    "        [7.577891409660878, 8.998289750371725],\n",
    "        [7.577794326946673, 8.998503901433935],\n",
    "    ],\n",
    "    [\n",
    "        [7.578139824893071, 8.999291979141560],\n",
    "        [7.578359687549607, 8.999414759083890],\n",
    "        [7.578456769364435, 8.999266281014116],\n",
    "        [7.578471046101925, 8.999197181604700],\n",
    "        [7.578247331649095, 8.999094883721964],\n",
    "        [7.578139824893071, 8.99929197914156],\n",
    "    ],\n",
    "    [\n",
    "        [7.577851730672876, 8.997811268775080],\n",
    "        [7.578012579816743, 8.997460464828633],\n",
    "        [7.577798113991832, 8.997311104523930],\n",
    "        [7.577667902951418, 8.997663440915119],\n",
    "        [7.577851730672876, 8.997811268775080],\n",
    "    ],\n",
    "    [\n",
    "        [7.578562417221803, 8.999551816663029],\n",
    "        [7.578688052511666, 8.999654609172921],\n",
    "        [7.578813688700849, 8.999443313458185],\n",
    "        [7.578670920426703, 8.999369073523950],\n",
    "        [7.578562417221803, 8.999551816663029],\n",
    "    ],\n",
    "    [\n",
    "        [7.577865711533433, 8.998252059784761],\n",
    "        [7.577989601239152, 8.998002756022402],\n",
    "        [7.577648754586391, 8.997784460884190],\n",
    "        [7.577545911714481, 8.998069316645683],\n",
    "        [7.577865711533433, 8.998252059784761],\n",
    "    ],\n",
    "]\n",
    "\n",
    "m = folium.Map(location=[7.577798113991832, 8.997311104523930], zoom_start=16)\n",
    "\n",
    "folium.Polygon(\n",
    "    locations=locations,\n",
    "    smooth_factor=2,\n",
    "    color=\"crimson\",\n",
    "    no_clip=True,\n",
    "    tooltip=\"Hi there!\",\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
